Citywide Effects Of High-occupancy Vehicle Restrictions: 
Evidence From “3-in-1” In Jakarta

Authors: Rema Hanna, Gabriel Kreindler, Benajmin Olken
Prepared by: Michael Fryar and Gabriel Kreindler
Prepared on: 17 May 2017

********
DATA
********

The directory "data/raw/" contains the original data. 
The directory "data/coded/" stores the Stata format data used in analyis.

*******
SELECTED ROUTES
*******

The file query_metadata.xlsx contains information on each of the road segments 
for which traffic data was queried from the Google Maps API. 

There were two phases of data collection, indicated in the 'query_version' column 
Phase 1 = version 0 (query_version=0) March 31st - May 8th
Phase 2 = version 1 (query_version=1) April 28th - August 16th

Within each phase, 'odid' uniquely identifies road segments. Longer paths made of one or more 
segments are identified by 'path_id' (only in phase 2).

From phase 1, for analysis we use road segments along 3 main roads:
- Former 3-in-1 (restricted): Jalan Sudirman
- Unrestricted alternate: Jalan Rasuna Said
- Unrestricted alternate: Jalan Tentara Pelajar

From phase 2, for analysis we use road segments along 12 routes:
- Four former 3-in-1 routes (Jalan Sudirman and Jalan Gatot Subroto, each in both directions)
- Eight unrestricted alternate routes suggested by the Jakarta Department of Transportation

For the last two routes in phase 1, we select road segments to ensure consistency with road segments
as defined in phase 2. These routes are identified in both phase 1 and phase 2 by the 
'v0_v1_overlap' column. The analysis of phase 1 data using different definitions leads to similar results. 
(For Rasuna Said, including odid=2 and 36, and for Tentara Pelajar, including odid=23 and 24).

Some routes in phase 1 were queried twice with very small differences in origin or destination coordinates 
(using the inner lane or outer lane of a road.) These pairs are indicated in the 'inner_outer'
column. Some road segments appear in two or more routes in phase 2, and are queried only once. These are 
identified by the 'redundant' column.

Some routes are on the same corridor as routes described above, either before or after. We did not 
include these in the analysis. These road segments are identified by the following columns:
- 'sudirman_corridor'
- 'rasuna_corridor'
- 'tentara_corridor'

The 'south_to_north' column is an indicator for northbound road segments. Broadly speaking this 
coincides with toward Central Business District (CBD).


*******
GOOGLE MAPS API QUERIES
*******

The folders 'code\google maps api (original)\' and 'code\google maps api (use me)\' 
contain python code that collects google maps travel time data using several Google 
Maps APIs. For future work and applications in other settings, it is adviseable to 
use the more recent "(use me)" version.


********
CODING
********

The data generated by the google maps api queries is one .csv file per time slice for 
the live data, and one .csv file per route segment for the predicted data. These files 
are appended together by the script 'code\coding\raw_data_append.py'. The individual 
files are not included because of the large number of files. All the data is contained 
in the following four files:
//  	combined_v0_live.csv
//  	combined_v0_predicted.csv
//  	combined_v0_live.csv
//  	combined_v0_live.csv


The master.do in the main directory runs all subsequent coding.


********
ANALYSIS
********

The master.do file in the main directory runs all of additional
do-files in "code/analysis". 

Several of the analysis do-files use a user-written program, lpoly_cluster_ci,
which calculates confidence bands for local linear regression (lpoly) 
using bootstrapping to adjust for clusters. 
This program is saved in "code/ado"

The code/analysis/table_s6.do uses the cgmwildboot command. 
The resulting p-values are saved in the log file output/log/table_s6.txt


********
OUTPUT
********

The directory "output" contains all of the figures and tables included in the
the main manuscript as well as the supplemental materials. There is also a 
subdirectory which contains the log generated by the master do-file. 


********
MAPS
********

The output\figures\figure_1 folder contains maps of the routes for which we have Google Maps data. 
These maps are created using Google Maps (Map data @2017 Google).

map_phase_1.html
- highlights the three routes from the first phase of data collection used in the analysis
- Former 3-in-1 route (Jalan Sudirman) in red
- Unrestricted alternate route (Jalan Rasuna Said) in blue
- Unrestricted alternate route (Jalan Tentara Pelajar) in green

map_phase_2.html
- highlights the 12 routes from the second phase of data collection used in the analysis 
  (4 formerly-restricted and 8 unrestricted)
- Former 3-in-1 (Jalan Sudirman and Jalan Gotot Subroto) in red (4 routes)
- Unrestricted alternate routes in various colors (8 routes)

figure_map_color.pdf
- Routes included in the analysis. 
  (1) Former 3-in-1 route (Jalan Sudirman) (red and dark red), 
  (2) Former 3-in-1 route (Jalan Gatot Subroto) (dark orange), 
  (3) Unrestricted alternate route (Jalan Rasuna Said) (blue), 
  (4) Unrestricted alternate route (Jalan Tentara Pelajar) (green), 
  (5) 8 unrestricted alternate routes from the Jakarta Department of Transport (gray). 
  Routes from the first phase of data collection are drawn with thin lines: 1 (red), 3 (blue) and 4 (green).

figure_map.pdf
- Routes included in the analysis. 
  (1) Former 3-in-1 route (Jalan Sudirman), 
  (2) Former 3-in-1 route (Jalan Gatot Subroto), 
  (3) Unrestricted alternate route (Jalan Rasuna Said), 
  (4) Unrestricted alternate route (Jalan Tentara Pelajar), 
  (5) 8 unrestricted alternate routes from the Jakarta Department of Transport. 
  Routes from the first phase of data collection (1,3,4) are drawn with thin dark lines.